{% set shipment = hookable_metadata.context.shipment %}

<td class="px-3 py-2 text-nowrap">
    <div class="py-2">
        <strong {{ sylius_test_html_attribute('shipment-method') }}>{{ shipment.method.name }}</strong>
        <div class="text-secondary">{{ ux_icon('tabler:world') }} {{ shipment.method.zone }}</div>
    </div>
    {% if shipment.shippedAt is not empty %}
        <div class="text-secondary-emphasis">
            <strong>{{ 'sylius.ui.shipped_at'|trans }}:</strong>
            <span {{ sylius_test_html_attribute('shipped-at-date') }}>{{ shipment.shippedAt|date('d-m-Y H:i:s') }}</span>
        </div>
    {% endif %}
    {% if shipment.state == 'shipped' and shipment.tracking is not empty %}
        <div class="text-secondary-emphasis">
            <strong>{{ 'sylius.ui.tracking_code'|trans }}:</strong>
            <span>{{ shipment.tracking }}</span>
        </div>
    {% endif %}
</td>
